package com.dylan.magic.mybatis.pagehelper.storage.dao;

import com.alibaba.fastjson.JSON;
import com.dylan.magic.mybatis.pagehelper.entity.po.GoodsPo;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Repository;

/**
 * @author : ankang
 * @date : 2019/12/13 17:03
 * @Description :
 */
@Repository
public class GoodsDao extends BaseDao<GoodsPo> {

    public Page<GoodsPo> select(int pageNum, int pageSize) {
        Page<GoodsPo> page = PageHelper.startPage(pageNum, pageSize, "id desc");
        System.out.println(page);
        return (Page<GoodsPo>) getMapper().select(null);
    }
}
